<extend name="Layout:layout_content" />
<block name="body_main">
    <div class="grid-parent xsui-page-header">
        <div class="grid-60 mobile-grid-100 grid-parent">
            <a href="{:U('attr_add')}" class="xsui-btn ui-state-default lnk-add2"><i class="fa fa-plus"></i>新增</a>
        </div>
        <div class="grid-40 mobile-grid-100 grid-parent xsui-text-right">
            <a href="#" class="xsui-btn ui-state-default lnk-refresh"><i class="fa fa-refresh"></i>刷新</a>
            <span class="xsui-input-group">
                <form method="get">
                    <input type="text" name="search_key" value="{$search.search_key}" placeholder="标题/名称" /><button type="submit" class="ui-state-default"><i class="fa fa-search"></i>搜索</button>
                </form>
            </span>
        </div>
    </div>
    <div id="xsui_container">
        {$content}
    </div>
</block>
<block name="body_after">
    <script type="text/javascript">
        $(function () {
            // 状态显示处理 2016-1-18 SoChishun Added.
            // 如：<td class="status"><a href="AddonU('change_status','id='.$vo['id'].'&status=varstatus')" title="点击隐藏" data-value="$vo.status" class="xsui-success"><i class="fa fa-check fa-fw"></i></a></td>
            $('td.form-status a').togglelink({onTip: '设为必填', offTip: '设为选填', onValue: 'Y', offValue: 'N'});
            $('td.search-status a').togglelink({onTip: '点击加入搜索', offTip: '点击取消搜索', onValue: 'Y', offValue: 'N'});
            $('td.list-status a').togglelink({onTip: '设为显示', offTip: '设为隐藏', onValue: 'Y', offValue: 'N'});
            $('td.export-status a').togglelink({onTip: '允许导出', offTip: '禁止导出', onValue: 'Y', offValue: 'N'});
            $('td.import-status a').togglelink({onTip: '允许导入', offTip: '禁止导入', onValue: 'Y', offValue: 'N'});
            $('td.status a').togglelink();
            // 动态更改排序 2015-10-24 SoChishun Added.
            $('td.sort input').blur(function () {
                var $input = $(this);
                change_sort($input);
            })
        })
    </script>
</block>